home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Dialog / c / Hide < prev    next >
Text File  |  1994-03-03  |  1KB  |  42 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Dialog.Hide.c
  12.     Author:  Copyright © 1993, 1994 Tim Browse and Jason Williams
  13.     Version: 1.00 (02 Mar 1994)
  14.     Purpose: Very high level window (dialogue) handling -
  15.              Showing non-permanent (menu) dialogues
  16. */
  17.  
  18.  
  19. #include "DeskLib:Wimp.h"
  20. #include "DeskLib:WimpSWIs.h"
  21.  
  22. #include "DeskLib:Dialog.h"
  23. #include "DeskLib:Screen.h"
  24.  
  25.  
  26. extern void Dialog_Hide(dialog d)
  27. {
  28.   if (d->state.isstatic)
  29.   {
  30.     /* Just close the window */
  31.     Wimp_CloseWindow(d->window);
  32.   }
  33.   else if (d->state.stillopen)
  34.   {
  35.     /* Window is actually a menu, and it is still open, so close the
  36.        menu, in case the Wimp gets upset.
  37.     */
  38.     Wimp_CreateMenu((menu_block *) -1, 0, 0);
  39.   }
  40. }
  41.  
  42.